<?php
declare (strict_types = 1);

namespace app\third\controller\admin;

use suframe\thinkAdmin\traits\SettingConfigController;
use think\facade\View;
use think\Model;

class Weixin extends Base
{
    use SettingConfigController;

    /**
     * @param Model $model
     * @return mixed
     */
    protected function filterGroup($model)
    {
        return $model->whereLike('key', 'weixin_%');
    }

    public function index()
    {
        if ($this->request->isPost()) {
            return $this->doPost();
        }
        return $this->doShow();
    }

    protected function getSettingAppName()
    {
        return $this->app->http->getName();
    }

    protected function fetchSettingView()
    {
        return View::fetch('weixin' . DIRECTORY_SEPARATOR . 'index');
    }

}
